package com.shoplook2025.brand.api.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shoplook2025.brand.model.Brand;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author yan
 * @date 2025/8/25
 */
@Mapper
public interface BrandMapper extends BaseMapper<Brand> {
    default Page<Brand> findAll(Page<Brand> page, Brand brand) {
        LambdaQueryWrapper<Brand> queryWrapper = Wrappers.lambdaQuery(brand);
        return this.selectPage(page, queryWrapper);
    }
}
